package com.erms.lab.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.erms.lab.mapper.SysTrainMapper;
import com.erms.lab.domain.SysTrain;
import com.erms.lab.service.ISysTrainService;
import com.erms.common.core.text.Convert;

/**
 * 承办培训情况Service业务层处理
 * 
 * @author guo
 * @date 2020-03-22
 */
@Service
public class SysTrainServiceImpl implements ISysTrainService 
{
    @Autowired
    private SysTrainMapper sysTrainMapper;

    /**
     * 查询承办培训情况
     * 
     * @param traId 承办培训情况ID
     * @return 承办培训情况
     */
    @Override
    public SysTrain selectSysTrainById(Long traId)
    {
        return sysTrainMapper.selectSysTrainById(traId);
    }

    /**
     * 查询承办培训情况列表
     * 
     * @param sysTrain 承办培训情况
     * @return 承办培训情况
     */
    @Override
    public List<SysTrain> selectSysTrainList(SysTrain sysTrain)
    {
        return sysTrainMapper.selectSysTrainList(sysTrain);
    }

    /**
     * 新增承办培训情况
     * 
     * @param sysTrain 承办培训情况
     * @return 结果
     */
    @Override
    public int insertSysTrain(SysTrain sysTrain)
    {
        return sysTrainMapper.insertSysTrain(sysTrain);
    }

    /**
     * 修改承办培训情况
     * 
     * @param sysTrain 承办培训情况
     * @return 结果
     */
    @Override
    public int updateSysTrain(SysTrain sysTrain)
    {
        return sysTrainMapper.updateSysTrain(sysTrain);
    }

    /**
     * 删除承办培训情况对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysTrainByIds(String ids)
    {
        return sysTrainMapper.deleteSysTrainByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除承办培训情况信息
     * 
     * @param traId 承办培训情况ID
     * @return 结果
     */
    @Override
    public int deleteSysTrainById(Long traId)
    {
        return sysTrainMapper.deleteSysTrainById(traId);
    }
}
